package com.yfkj.demo.controller;

import com.yfkj.receiver.mq.rabbitmq.RabbitMqConstant;
import com.yfkj.support.mq.SendMqService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * MQ测试
 */
@RestController
public class MqController {

    @Autowired
    SendMqService sendMqService;


    @GetMapping("/sendMq/{message}")
    public void sendMq(@PathVariable("message") String message){
        sendMqService.send(RabbitMqConstant.testRouteKey,message);
    }

}
